﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AddVote.aspx.cs" Inherits="Business_Cisoft3G_InboxManage_AddVote" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>投票调查新增</title>
    <link href="../../../css/style.css" rel="stylesheet" type="text/css" />
    <link href="../../../css/font.css" rel="stylesheet" type="text/css" />
    <link href="../../../css/style_ts.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript" src="../../../js/My97DatePicker/WdatePicker.js"></script>

    <script type="text/javascript" src="../../../js/jquery-1.4.2.min.js"></script>

    <style type="text/css">
        .modalBackground
        {
            background-color: Gray;
            filter: alpha(opacity=70);
            opacity: 0.7;
        }
        .tab
        {
            background-color: #FAFAFA;
            margin: 2px 5px;
            padding: 2px 4px;
        }
        .tab p span
        {
            background-color: #EFEFEF;
            border: 1px solid #CCCCCC;
            cursor: pointer;
            margin-right: 6px;
            padding: 2px 5px;
        }
        .tab p span.current
        {
            background-color: #FAFAFA;
            border-bottom-color: #fafafa;
        }
        .tab p
        {
            border-bottom: 1px solid #CCCCCC;
            font-weight: bold;
            padding: 0 10px 2px;
        }
        .tab li
        {
            border-bottom: 1px dotted #CCCCCC;
            padding-bottom: 2px;
            margin: 1px 0;
        }
        .tab .mhot, .tab.allhot
        {
            display: none;
        }
        .tab ul
        {
            margin-left: 1px;
        }
    </style>

    <script type="text/javascript">
        $(document).ready(function() {
            $('#txtDateA').click(function() {
                WdatePicker({ minDate: '%y-%M-{%d}' });
            });
            $('#txtDateB').click(function() {
                WdatePicker({ minDate: '%y-%M-{%d}' });
            });
            $('#tb_SendTime').click(function() {
                WdatePicker({ minDate: '%y-%M-{%d}' });
            });

            $('#rb_Now').click(function() {
                $('#tb_SendTime').hide();
                $('#imgTiming').hide();
                $('#ddl_SendHour').hide();
                $('#ddl_SendMinite').hide();
                $('#spanHour').hide();
                $('#spanMinite').hide();
            });
            $('#rb_Timing').click(function() {
                $('#tb_SendTime').show();
                $('#imgTiming').show();
                $('#ddl_SendHour').show();
                $('#ddl_SendMinite').show();
                $('#spanHour').show();
                $('#spanMinite').show();

                $('#tb_SendTime').val('');
                $('#spanHour').val('00');
                $('#spanMinite').val('00');
            });

            //Tab
            $(".tab span:first").addClass("current"); //为第一个SPAN添加当前效果样式
            $(".tab ul:not(:first)").hide(); //隐藏其它的UL
            $(".tab span").click(function() {
                $(".tab span").removeClass("current"); //去掉所有SPAN的样式
                $(this).addClass("current");
                $(".tab ul").hide();
                $("." + $(this).attr("id")).fadeIn('normal');
            });
            //TreeView点击
            var o = $("a[href^='GetContactsHandler']");
            o.each(function() {
                var oo = $(this);
                oo.click(function() {
                    $('#s1').empty();
                    $.ajax({
                        type: "GET",
                        cache: false,
                        url: oo.attr('href'),
                        success: function(msg) {
                            $('#s1').append(msg);
                        }
                    });
                    return false;
                });
            });

            //点击查询按钮
            $('#btnSearch').click(function() {
                $('#s1').empty();
                $.ajax({
                    type: "GET",
                    cache: false,
                    url: 'GetContactsHandler.ashx?SearchType=' + $('#ddlSearchType option:selected').val() + '&Condition=' + $.trim($('#txtCondition').val()),
                    success: function(msg) {
                        if ($.trim(msg) != '') {
                            $('#s1').append(msg);
                        }
                    }
                });
            });
            //点击确认按钮
            $('#btnConfirm').click(function() {
                var mobiles = '';
                if ($('#s2 option').length > 0) {
                    $('#s2 option').each(function() {
                        var op = $(this);
                        var txt = $('#tb_Mobile');
                        if (txt.text().indexOf(op.val()) == -1 && op.val() != '') {
                            if ($.trim(txt.text()).length == 0) {
                                txt.append(op.val() + ',');
                            }
                            else {
                                if ($.trim(txt.text()).indexOf(',') == $.trim(txt.text()).length - 1) {
                                    txt.append(op.val() + ',');
                                }
                                else {
                                    txt.append(',' + op.val() + ',');
                                }
                            }
                        }
                        else { }
                    });
                    $('#tb_Mobile').text($('#tb_Mobile').text().substr(0, $('#tb_Mobile').text().length - 1));
                    $('#tb_Mobile').text($.trim($('#tb_Mobile').val()).replace(/,,/g, ","));
                    $('#btnCloseAll').click();
                }
            });

            //左边双击
            $("#s1").dblclick(function() {
                var alloptions = $("#s1 option");
                var so = $("#s1 option:selected");

                //so.get(so.length - 1).index == alloptions.length - 1 ? so.prev().attr("selected", true) : so.next().attr("selected", true);
                if ($("#s2").val() == null) {
                    $("#s2").append(so);
                }
                if ($("#s2").text() != null) {
                    if ($("#s2").text().indexOf(so.val()) == -1) {
                        $("#s2").append(so);
                    }
                    if ($("#s2").text().indexOf(so.val()) > -1) {
                    }
                }
                var strings = '';
                $('#s2 option').each(function() {
                    strings = strings + $(this).val() + ',';
                });

                $('#hih_right').attr('value', strings);
            });
            //右边双击
            $("#s2").dblclick(function() {
                var alloptions = $("#s2 option");
                var so = $("#s2 option:selected");
                //so.get(so.length - 1).index == alloptions.length - 1 ? so.prev().attr("selected", true) : so.next().attr("selected", true);
                if ($("#s1").text() == null) {
                    $("#s1").append(so);
                }
                if ($("#s1").text() != null) {
                    if ($("#s1").text().indexOf(so.val()) == -1) {
                        $("#s1").append(so);
                    }
                    else {
                        so.remove();
                    }
                }
                var strings = '';
                $('#s2 option').each(function() {
                    strings = strings + $(this).val() + ',';
                });

                $('#hih_right').attr('value', strings);
            });
            //选中右移
            $("#add").click(function() {
                var alloptions = $("#s1 option");
                if ($("#s1 option").val() != null) {
                    var so = $("#s1 option:selected");
                    if (so.length > 0) {
                        //so.get(so.length - 1).index == alloptions.length - 1 ? so.prev().attr("selected", true) : so.next().attr("selected", true);
                        if ($('#s2').text() == null) {
                            $("#s2").append(so);
                        }
                        if ($('#s2').text() != null) {
                            if ($('#s2').text().indexOf(so.val()) == -1) {
                                $("#s2").append(so);
                            }
                            else {
                                so.remove();
                            }
                        }
                    }
                }
                var strings = '';
                $('#s2 option').each(function() {
                    strings = strings + $(this).val() + ',';
                });

                $('#hih_right').attr('value', strings);
            });
            //选中左移
            $("#remove").click(function() {
                var alloptions = $("#s2 option");
                if (alloptions.length > 0) {
                    var so = $("#s2 option:selected");
                    if (so.length > 0) {
                        //so.get(so.length - 1).index == alloptions.length - 1 ? so.prev().attr("selected", true) : so.next().attr("selected", true);
                        if ($('#s1 option').length == 0) {
                            $("#s1").append(so);
                        }
                        else {
                            if ($('#s1').text().indexOf(so.val()) == -1) {
                                $("#s1").append(so);
                            }
                            else {
                                so.remove();
                            }
                        }
                    }
                }
                var strings = '';
                $('#s2 option').each(function() {
                    strings = strings + $(this).val() + ',';
                });

                $('#hih_right').attr('value', strings);
            });
            //全部右移
            $("#addall").click(function() {
                if ($("#s1").text() != null) {
                    //$("#s1").eq(0).selectedIndex = 0;
                    if ($("#s2 option").length == 0) {
                        //alert($("#s2").text());
                        $("#s2").append($("#s1 option"));
                    }
                    if ($("#s2").text() != null) {
                        var flag = false;
                        $("#s1 option").each(function() {
                            if ($("#s2").text().indexOf($(this).val()) == -1) {
                                $("#s2").append($(this));
                            }
                            else {
                                $(this).remove();
                            }
                        });
                    }
                    $("#s1").val(null);
                }
                var strings = '';
                $('#s2 option').each(function() {
                    strings = strings + $(this).val() + ',';
                });

                $('#hih_right').attr('value', strings);
                $("#s1").empty();
                $("#s1").html('');
            });
            //全部左移
            $("#removeall").click(function() {
                if ($("#s2").text() != null) {
                    if ($("#s1").text() == null) {
                        $("#s1").append($("#s2 option"));
                    }
                    if ($("#s1").text() != null) {
                        var flag = false;
                        $("#s2 option").each(function() {
                            var s2o = $(this);
                            if ($("#s1").text().indexOf(s2o.val()) == -1) {
                                $("#s1").append(s2o);
                            }
                            else {
                                s2o.remove();
                            }
                        });
                    }
                    $("#s2").empty();
                }
                var strings = '';
                $('#s2 option').each(function() {
                    strings = strings + $(this).val() + ',';
                });

                $('#hih_right').attr('value', strings);
            });
        });

    </script>

    <script type="text/javascript">
        String.prototype.len = function() {
            return this.replace(/[^\x00-\xff]/g, "**").length;
        }

        function check(obj) {
            var re = /[^\x00-\xff]/g;
            return re.test(obj);
        }
        //gwh 20100221 追加内容判断
        function select_onblurAll() {
            var flag = false;
            var text1 = document.getElementById('txtRecive');
            var spanforerror = document.getElementById('spanReciveNotic');
            var text1content = document.getElementById('txtSMsContent');

            if (text1.value.length > 0) {
                var arraryText1 = text1.value.trim().split(',');
                for (var i = 0; i < arraryText1.length; i++) {
                    if (arraryText1[i].length > 0) {
                        if (arraryText1[i].length != 11 && !checkMobile(arraryText1[i])) {
                            spanforerror.innerHTML = "<span style='color:red; font-weight:bold'>号码\"" + arraryText1[i].substring(0, 11) + "\"不是有效的手机号码！</span>";
                            flag = false;
                            break;
                        }
                        spanforerror.innerHTML = "";
                        flag = true;
                        continue;
                    }
                }
            }
            return flag;
        }
    </script>

    <style type="text/css">
        .modalBackground
        {
            background-color: Gray;
            filter: alpha(opacity=70);
            opacity: 0.7;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <input type="hidden" runat="server" id="hih_right" />
    <asp:ScriptManager ID="Scriptmanager1" runat="server" EnableScriptGlobalization="true"
        EnableScriptLocalization="true">
    </asp:ScriptManager>
    <div class="position_list">
        <div class="position_left_list">
        </div>
        <div class="position_con_list">
            <table border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <td width="30">
                        <img src="../../../Images/3G/icon21.gif" width="14" height="14" alt="" />
                    </td>
                    <td class="cyan12">
                        投票调查新增
                    </td>
                </tr>
            </table>
        </div>
        <div class="position_right_list">
        </div>
    </div>
    <!--[if !IE]>搜素区域开始<![endif]-->
    <div class="search_list">
        <div class="search_top_list">
            <div class="search_topleft_list">
            </div>
            <!--  查询     -->
            <div class="search_topbg_list">
                <table border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td width="30" align="left" valign="middle" style="padding-top: 4px;">
                            <img src="../../../Images/3G/icon_logo.gif" width="22" height="22" />
                        </td>
                        <td width="100" class="cyan13_bold" style="padding-top: 5px;">
                            系统温馨提示栏
                        </td>
                        <td style="padding-top: 5px;">
                        </td>
                    </tr>
                </table>
            </div>
            <div class="search_topright_list">
            </div>
        </div>
        <!--   列表     -->
        <div class="index_search_con_list">
            <%--<table border="2" cellpadding="5" cellspacing="1" bordercolor="#73798f" style="width: 100%;
                text-align: center; background-color: #1E3541; border-collapse: collapse;">--%>
            <table border="0" cellpadding="5" cellspacing="1" width="100%" class="white12_normal">
                <!--投票主题-->
                <tr>
                    <td align="right" style="width: 120px">
                        <span style="color: Red;">*</span>投票主题：
                    </td>
                    <td style="text-align: left; border: 1px; width: 57%; max-width: 57%; padding-left: 10px"
                        colspan="2">
                        <asp:TextBox ID="tb_VoteContent" runat="server" Width="500px" MaxLength="130" BorderWidth="1px"
                            Height="50px" TextMode="MultiLine" Style="overflow: hidden;"></asp:TextBox>
                    </td>
                    <td>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="tb_VoteContent"
                            Display="Dynamic" ErrorMessage="<span class=reshow>(*)请填写投票主题</span>"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <!--投票选项-->
                <tr>
                    <td style="width: 120px; text-align: right">
                        <span style="color: Red;">*</span>投票选项：
                    </td>
                    <td style="text-align: left; border: 1px; padding-left: 10px" colspan="3">
                        <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                            <ContentTemplate>
                                <span>投票选项个数 ：</span>
                                <asp:DropDownList ID="ddl_Options" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddl_Options_SelectedIndexChanged">
                                    <%--<asp:DropDownList ID="ddl_Options" runat="server" AutoPostBack="false">--%>
                                    <asp:ListItem Text="2" Value="2"></asp:ListItem>
                                    <asp:ListItem Text="3" Value="3"></asp:ListItem>
                                    <asp:ListItem Text="4" Value="4"></asp:ListItem>
                                    <asp:ListItem Text="5" Value="5"></asp:ListItem>
                                    <asp:ListItem Text="6" Value="6"></asp:ListItem>
                                    <asp:ListItem Text="7" Value="7"></asp:ListItem>
                                    <asp:ListItem Text="8" Value="8"></asp:ListItem>
                                    <asp:ListItem Text="9" Value="9"></asp:ListItem>
                                    <asp:ListItem Text="10" Value="10"></asp:ListItem>
                                    <asp:ListItem Text="11" Value="11"></asp:ListItem>
                                    <asp:ListItem Text="12" Value="12"></asp:ListItem>
                                    <asp:ListItem Text="13" Value="13"></asp:ListItem>
                                    <asp:ListItem Text="14" Value="14"></asp:ListItem>
                                    <asp:ListItem Text="15" Value="15"></asp:ListItem>
                                    <asp:ListItem Text="16" Value="16"></asp:ListItem>
                                    <asp:ListItem Text="17" Value="17"></asp:ListItem>
                                    <asp:ListItem Text="18" Value="18"></asp:ListItem>
                                    <asp:ListItem Text="19" Value="19"></asp:ListItem>
                                    <asp:ListItem Text="20" Value="20"></asp:ListItem>
                                </asp:DropDownList>
                                <span>个</span>
                                <br />
                                <asp:Panel ID="Pan_Options" runat="server">
                                    <asp:Label ID="lbl_Option1" runat="server" Text="选项1:"></asp:Label>&nbsp;
                                    <asp:TextBox ID="tb_Option1" runat="server"></asp:TextBox>
                                    <asp:Label ID="lbl_Option2" runat="server" Text="选项2:"></asp:Label>&nbsp;
                                    <asp:TextBox ID="tb_Option2" runat="server"></asp:TextBox>
                                    <asp:Label ID="lbl_Option3" runat="server" Text="选项3:" Visible="false"></asp:Label>&nbsp;
                                    <asp:TextBox ID="tb_Option3" runat="server" Visible="false"></asp:TextBox>
                                    <asp:Label ID="lbl_Option4" runat="server" Text="选项4:" Visible="false"></asp:Label>&nbsp;
                                    <asp:TextBox ID="tb_Option4" runat="server" Visible="false"></asp:TextBox>
                                    <asp:Label ID="lbl_Option5" runat="server" Text="选项5:" Visible="false"></asp:Label>&nbsp;
                                    <asp:TextBox ID="tb_Option5" runat="server" Visible="false"></asp:TextBox>
                                    <asp:Label ID="lbl_Option6" runat="server" Text="选项6:" Visible="false"></asp:Label>&nbsp;
                                    <asp:TextBox ID="tb_Option6" runat="server" Visible="false"></asp:TextBox>
                                    <asp:Label ID="lbl_Option7" runat="server" Text="选项7:" Visible="false"></asp:Label>&nbsp;
                                    <asp:TextBox ID="tb_Option7" runat="server" Visible="false"></asp:TextBox>
                                    <asp:Label ID="lbl_Option8" runat="server" Text="选项8:" Visible="false"></asp:Label>&nbsp;
                                    <asp:TextBox ID="tb_Option8" runat="server" Visible="false"></asp:TextBox>
                                    <asp:Label ID="lbl_Option9" runat="server" Text="选项9:" Visible="false"></asp:Label>&nbsp;
                                    <asp:TextBox ID="tb_Option9" runat="server" Visible="false"></asp:TextBox>
                                    <asp:Label ID="lbl_Option10" runat="server" Text="选项10:" Visible="false"></asp:Label>
                                    <asp:TextBox ID="tb_Option10" runat="server" Visible="false"></asp:TextBox>
                                    <asp:Label ID="lbl_Option11" runat="server" Text="选项11:" Visible="false"></asp:Label>
                                    <asp:TextBox ID="tb_Option11" runat="server" Visible="false"></asp:TextBox>
                                    <asp:Label ID="lbl_Option12" runat="server" Text="选项12:" Visible="false"></asp:Label>
                                    <asp:TextBox ID="tb_Option12" runat="server" Visible="false"></asp:TextBox>
                                    <asp:Label ID="lbl_Option13" runat="server" Text="选项13:" Visible="false"></asp:Label>
                                    <asp:TextBox ID="tb_Option13" runat="server" Visible="false"></asp:TextBox>
                                    <asp:Label ID="lbl_Option14" runat="server" Text="选项14:" Visible="false"></asp:Label>
                                    <asp:TextBox ID="tb_Option14" runat="server" Visible="false"></asp:TextBox>
                                    <asp:Label ID="lbl_Option15" runat="server" Text="选项15:" Visible="false"></asp:Label>
                                    <asp:TextBox ID="tb_Option15" runat="server" Visible="false"></asp:TextBox>
                                    <asp:Label ID="lbl_Option16" runat="server" Text="选项16:" Visible="false"></asp:Label>
                                    <asp:TextBox ID="tb_Option16" runat="server" Visible="false"></asp:TextBox>
                                    <asp:Label ID="lbl_Option17" runat="server" Text="选项17:" Visible="false"></asp:Label>
                                    <asp:TextBox ID="tb_Option17" runat="server" Visible="false"></asp:TextBox>
                                    <asp:Label ID="lbl_Option18" runat="server" Text="选项18:" Visible="false"></asp:Label>
                                    <asp:TextBox ID="tb_Option18" runat="server" Visible="false"></asp:TextBox>
                                    <asp:Label ID="lbl_Option19" runat="server" Text="选项19:" Visible="false"></asp:Label>
                                    <asp:TextBox ID="tb_Option19" runat="server" Visible="false"></asp:TextBox>
                                    <asp:Label ID="lbl_Option20" runat="server" Text="选项20:" Visible="false"></asp:Label>
                                    <asp:TextBox ID="tb_Option20" runat="server" Visible="false"></asp:TextBox>
                                </asp:Panel>
                            </ContentTemplate>
                        </asp:UpdatePanel>
                        <asp:RequiredFieldValidator ID="rfv_1" runat="server" ErrorMessage="请填写投票选项1" ControlToValidate="tb_Option1"
                            Display="Dynamic"></asp:RequiredFieldValidator>
                        <asp:RequiredFieldValidator ID="rfv_2" runat="server" ErrorMessage="请填写投票选项2" ControlToValidate="tb_Option2"
                            Display="Dynamic"></asp:RequiredFieldValidator>
                        <asp:Label ID="lbl_OptionValidator" runat="server" Text=""></asp:Label>
                    </td>
                </tr>
                <!--添加手机号码-->
                <tr>
                    <td align="right" style="width: 120px">
                        <%--<span style="color: Red; overflow: hidden;">*</span> <span style="overflow: hidden;">
                            添加手机号码：</span>--%>
                        <span style="color: Red;">*</span><asp:Button ID="btnCallContacts" runat="server"
                            ToolTip="选择联系人" CausesValidation="false" OnClick="btnCallContacts_Click" />
                    </td>
                    <td style="text-align: left; border-right: 0px; width: 57%; max-width: 600px; padding-left: 10px"
                        colspan="2">
                        <asp:TextBox ID="tb_Mobile" runat="server" Width="500px" BorderWidth="1px" Height="88px"
                            TextMode="MultiLine" Style="overflow: hidden"></asp:TextBox>
                    </td>
                    <td style="vertical-align: top; text-align: left; border-left: 0px;">
                        <br />
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="tb_Mobile"
                            Display="Dynamic" ErrorMessage="请选择或填写至少一个号码！"></asp:RequiredFieldValidator>
                        <span id="spanReciveNotic" />
                    </td>
                </tr>
                <!--起止时间-->
                <tr>
                    <td align="right" style="width: 120px">
                        <span style="color: Red;">*</span>起止时间：
                    </td>
                    <td style="text-align: left; padding-left: 10px" colspan="3">
                        <asp:TextBox ID="txtDateA" Width="70px" runat="server" Style="border: 1px solid #ffffff"></asp:TextBox>
                        <img src="../../../Images/Calendar_scheduleHS.png" title="点击选择日期" id="imgStartDate"
                            onclick="WdatePicker({el:'txtDateA',minDate:'%y-%M-{%d}'})" />
                        <%--<asp:ImageButton runat="Server" ID="Image1" ImageUrl="~/Images/Calendar_scheduleHS.png"
                            CausesValidation="false" AlternateText="点击选择日期" />--%>
                        <%-- <ajaxToolkit:CalendarExtender ID="customCalendarExtender" runat="server" TargetControlID="txtDateA"
                            Format="yyyy-MM-dd" PopupButtonID="Image1" />--%>
                        <%--<asp:DropDownList ID="ddl_StartHour" runat="server">
                        </asp:DropDownList>时--%>
                        至：
                        <asp:TextBox ID="txtDateB" Width="70px" runat="server" Style="border: 1px solid #ffffff"></asp:TextBox>
                        <%--<asp:ImageButton runat="Server" ID="Image2" ImageUrl="~/Images/Calendar_scheduleHS.png"
                            CausesValidation="false" AlternateText="点击选择日期" />--%>
                        <img src="../../../Images/Calendar_scheduleHS.png" title="点击选择日期" id="imgEndDate"
                            onclick="WdatePicker({el:'txtDateB',minDate:'%y-%M-{%d}'})" />
                        <%--<ajaxToolkit:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtDateB"
                            Format="yyyy-MM-dd" PopupButtonID="Image2" />--%>
                        <%--<asp:DropDownList ID="ddl_EndHour" runat="server">
                        </asp:DropDownList>时    --%>
                        <span class="cyan12">
                            <asp:Label ID="lbldate" runat="server" Text="正确的日期格式为:YYYY-MM-DD"></asp:Label>
                        </span>
                        <br />
                        <!--验证-->
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="请填写投票开始时间！"
                            ControlToValidate="txtDateA" Display="Dynamic"></asp:RequiredFieldValidator>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="<span style='color:red; font-size:13px;'>请填写投票结束时间！</span>"
                            ControlToValidate="txtDateB" Display="Dynamic"></asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage="<span style='color:red; font-size:13px;'>开始日期格式不正确！</span>"
                            ControlToValidate="txtDateA" Display="Dynamic" ValidationExpression="^(?:(?!0000)[0-9]{4}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)-02-29)$"></asp:RegularExpressionValidator>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ErrorMessage="<span style='color:red; font-size:13px;'>结束日期格式不正确！</span>"
                            ControlToValidate="txtDateB" Display="Dynamic" ValidationExpression="^(?:(?!0000)[0-9]{4}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)-02-29)$"></asp:RegularExpressionValidator>
                        <%--<asp:CompareValidator ID="CompareValidator1" runat="server" ErrorMessage="结束时间必须大于开始时间！"></asp:CompareValidator>--%>
                        <asp:Label ID="lbl_SendTimeValidator" runat="server" Text=""></asp:Label>
                    </td>
                </tr>
                <!--发送方式-->
                <tr>
                    <td align="right" style="width: 120px" valign="top">
                        <span style="color: Red;">*</span>发送方式：
                    </td>
                    <td style="text-align: left; padding-left: 10px" colspan="3">
                        <%--<asp:UpdatePanel ID="UpdatePanel1" runat="server">
                            <ContentTemplate>--%>
                        <%--<asp:RadioButton ID="rb_Now" runat="server" Text="立即" GroupName="SendTime" AutoPostBack="true"
                            OnCheckedChanged="rb_Now_CheckedChanged" Checked="true" />
                        <asp:RadioButton ID="rb_Timing" runat="server" Text="定时" GroupName="SendTime" OnCheckedChanged="rb_Timing_CheckedChanged"
                            AutoPostBack="true" />--%>
                        <asp:RadioButton ID="rb_Now" runat="server" Text="立即" GroupName="SendTime" AutoPostBack="false"
                            Checked="true" />
                        <asp:RadioButton ID="rb_Timing" runat="server" Text="定时" GroupName="SendTime" AutoPostBack="false" />
                        <%--<div runat="server" id="div_Timing">--%>
                        <asp:TextBox ID="tb_SendTime" Width="70px" runat="server" Style="border: 1px solid #ffffff;
                            display: none;"></asp:TextBox>
                        <img src="../../../Images/Calendar_scheduleHS.png" title="点击选择日期" id="imgTiming"
                            style="display: none" onclick="WdatePicker({el:'tb_SendTime',minDate:'%y-%M-{%d}'})" />
                        <%--<asp:ImageButton runat="Server" ID="ibtn_SendTime" ImageUrl="~/Images/Calendar_scheduleHS.png"
                                    CausesValidation="false" AlternateText="点击选择日期" />--%>
                        <%--<ajaxToolkit:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID="tb_SendTime"
                                    Format="yyyy-MM-dd" PopupButtonID="ibtn_SendTime" />--%>
                        <asp:DropDownList ID="ddl_SendHour" runat="server" Style="display: none;">
                        </asp:DropDownList>
                        <span id="spanHour" style="display: none;">时</span>
                        <asp:DropDownList ID="ddl_SendMinite" runat="server" Style="display: none;">
                        </asp:DropDownList>
                        <span id="spanMinite" style="display: none;">分</span>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ErrorMessage="发送日期格式不正确！"
                            ControlToValidate="tb_SendTime" Display="Dynamic" ValidationExpression="^(?:(?!0000)[0-9]{4}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)-02-29)$">
                        </asp:RegularExpressionValidator>
                        <%--                            <ajaxToolkit:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" 
                                TargetControlID="RegularExpressionValidator3"> 
                            </ajaxToolkit:ValidatorCalloutExtender>  --%><%--</div>--%>
                        <%--</ContentTemplate>
                        </asp:UpdatePanel>--%>
                    </td>
                </tr>
                <tr>
                    <td align="right" style="width: 120px">
                    </td>
                    <td style="text-align: left; padding-left: 10px" colspan="3">
                        <%--<asp:ImageButton ID="submit" runat="server" ImageUrl="../../../Images/3G/button_xinzeng.gif"
                            ToolTip="新增" OnClick="btnSave_Click" CausesValidation="true" OnClientClick="if(select_onblurAll()){document.getElementById('LinkButton2').click();}else{return false;}"/>--%>
                        <asp:Button ID="btnAdd" runat="server" Text="" ToolTip="" OnClick="btnSave_Click"
                            CausesValidation="true" />
                        <%--<asp:ImageButton ID="butrReset" runat="server" ImageUrl="../../../Images/3G/button_fanhui.gif"
                            CausesValidation="False" ToolTip="返回" OnClick="butrReset_Click" />--%>
                        <asp:Button ID="btnBack" runat="server" Text="" ToolTip="" CausesValidation="false"
                            OnClick="butrReset_Click" />
                        <asp:LinkButton ID="LinkButton2" runat="server" OnClick="btnSave_Click"></asp:LinkButton>
                    </td>
                </tr>
            </table>
            <%--<table width="818px"  border="0" cellspacing="1" cellpadding="0" bgcolor="73798f" id="tableList">
                <tr class="cyan12" bgcolor="#1E3541">
                    
                    <td align="center" valign="middle">
                        <asp:Label runat="server" Text="" ID="lbl_show"></asp:Label>
                    </td>
                </tr>
               
            </table>--%>
        </div>
    </div>
    <div class="search_bottom_list">
        <div class="search_bottomleft_list">
        </div>
        <div class="search_bottombg_list">
        </div>
        <div class="search_bottomright_list">
        </div>
    </div>
    <!--[if !IE]>搜素区域结束     </div>
        <div class="search_bottomright_list">
        </div>
    </div>
    <!--[if !IE]>搜素区域结束<![endif]-->
    <%--<ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender3" runat="server" TargetControlID="LinkButton1"
        PopupControlID="appease_Panel1" BackgroundCssClass="modalBackground" OnOkScript="onOk()"
        PopupDragHandleControlID="appease_Panel1" CancelControlID="btnClose">
    </ajaxToolkit:ModalPopupExtender>
    <asp:Panel ID="appease_Panel1" runat="server" Style="display: none; background-color: #041e2d;
        border-width: 3px; border-style: solid; border-color: Gray; padding: 3px;">
        <div>
            <asp:Panel ID="appease_Panel3" runat="server">--%>
    <ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender3" runat="server" TargetControlID="LinkButton1"
        PopupControlID="appease_Panel1" BackgroundCssClass="modalBackground" OnOkScript="onOk()"
        DropShadow="false" PopupDragHandleControlID="appease_Panel2" CancelControlID="btnCloseAll">
    </ajaxToolkit:ModalPopupExtender>
    <asp:Panel ID="appease_Panel1" runat="server" Style="display: none; width: 650px;
        vertical-align: middle;">
        <div class="attention">
            <asp:Panel ID="appease_Panel2" runat="server" Style="vertical-align: middle;">
                <div class="attention_top">
                    <div class="attention_topleft">
                    </div>
                    <div class="attention_topmid">
                        <table width="98%" border="0" cellpadding="0" cellspacing="0">
                            <tr>
                                <td align="left" valign="middle" class="title">
                                    通讯录
                                </td>
                                <td align="right" valign="middle" width="30">
                                    <asp:Button ID="btnCloseAll" runat="server" Text="" />
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div class="attention_topright">
                    </div>
                </div>
            </asp:Panel>
            <div class="attention_con">
                <asp:Panel ID="appease_Panel3" runat="server">
                    <table border="1" cellpadding="0" cellspacing="0" bordercolor="#0e62a7" style="width: 100%;">
                        <tr>
                            <td valign="top">
                                <%-- <table>
                                    <tr>
                                        <td valign="top">--%>
                                <div class="tab" style="text-align: left">
                                    <p>
                                        <span id="tab1">组织结构</span><span id="tab2">自定义组</span>
                                    </p>
                                    <br />
                                    <ul class="tab1">
                                        <asp:TreeView ID="tvContactsGroup" runat="server" ImageSet="Arrows" ShowLines="True">
                                            <ParentNodeStyle Font-Bold="False" />
                                            <HoverNodeStyle Font-Underline="False" ForeColor="#5555DD" />
                                            <SelectedNodeStyle Font-Underline="False" HorizontalPadding="0px" VerticalPadding="0px"
                                                ForeColor="#5555DD" Font-Bold="true" />
                                            <RootNodeStyle ForeColor="Blue" />
                                            <NodeStyle Font-Names="Tahoma" Font-Size="10pt" ForeColor="Black" HorizontalPadding="5px"
                                                NodeSpacing="0px" VerticalPadding="0px" />
                                        </asp:TreeView>
                                    </ul>
                                    <ul class="tab2">
                                        <table border="0" cellpadding="0" cellspacing="0">
                                            <asp:Label ID="lblDefineGroup" runat="server" Text=""></asp:Label>
                                        </table>
                                    </ul>
                                </div>
                                <%--</td>
                                    </tr>
                                </table>--%>
                            </td>
                            <td valign="top">
                                <!--查询框-->
                                <table border="0" cellpadding="0" cellspacing="0">
                                    <tr>
                                        <td>
                                            <span>查询选项：</span>
                                            <asp:DropDownList ID="ddlSearchType" runat="server">
                                                <asp:ListItem Selected="True" Value="CT_Name">姓名</asp:ListItem>
                                                <asp:ListItem Value="CT_Mobile">手机号码</asp:ListItem>
                                            </asp:DropDownList>
                                            <asp:TextBox ID="txtCondition" runat="server" Style="border: 1px solid #000000; width: 120px"
                                                MaxLength="11"></asp:TextBox>
                                            <input type="button" id="btnSearch" runat="server" title="查询" style="width: 61px;
                                                height: 21px; border: 0px; background: url(../../../Images/3G/button_search.gif) no-repeat;" />
                                            <%--<asp:Button ID="btnConfirm" runat="server" ToolTip="确认选择" OnClick="btnClose_Click"
                                                CausesValidation="false" />--%>
                                            <input type="button" id="btnConfirm" />
                                        </td>
                                    </tr>
                                </table>
                                <table border="0" cellpadding="0" cellspacing="0">
                                    <tr>
                                        <td>
                                            <div id="divData">
                                                <table>
                                                    <tr>
                                                        <td style="vertical-align: top">
                                                            <span>联系人</span>
                                                            <br />
                                                            <asp:ListBox ID="s1" runat="server" Height="250px" Width="175px" SelectionMode="Multiple">
                                                            </asp:ListBox>
                                                        </td>
                                                        <td style="vertical-align: middle">
                                                            <input type="button" id="addall" runat="server" title="全部右移" />
                                                            <br />
                                                            <input type="Button" id="add" runat="server" title="右移" />
                                                            <br />
                                                            <input type="Button" id="remove" runat="server" title="左移" />
                                                            <br />
                                                            <input type="Button" id="removeall" runat="server" title="全部左移" />
                                                        </td>
                                                        <td>
                                                            <span>已选择联系人</span>
                                                            <br />
                                                            <asp:ListBox ID="s2" runat="server" Height="250px" Width="175px" SelectionMode="Multiple">
                                                            </asp:ListBox>
                                                            <select id="s3" style="display: none" />
                                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                                        </td>
                                                    </tr>
                                                </table>
                                            </div>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
            </div>
        </div>
    </asp:Panel>
    <asp:LinkButton ID="LinkButton1" runat="server" Visible="true" OnClick="LinkButton1_Click"></asp:LinkButton>
    <!-- 提示框   -->
    <ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender2" runat="server" TargetControlID="LinkButton3"
        PopupControlID="Panel1" BackgroundCssClass="modalBackground" OnOkScript="onOk()"
        DropShadow="true" PopupDragHandleControlID="Panel2" CancelControlID="btnCloseAll2">
    </ajaxToolkit:ModalPopupExtender>
    <asp:Panel ID="Panel1" runat="server" Style="display: none; width: 450px; vertical-align: middle;">
        <div class="attention">
            <asp:Panel ID="Panel2" runat="server" Style="vertical-align: middle;">
                <div class="attention_top">
                    <div class="attention_topleft">
                    </div>
                    <div class="attention_topmid">
                        <table width="98%" border="0" cellpadding="0" cellspacing="0">
                            <tr>
                                <td align="left" valign="middle" class="title">
                                    提示信息
                                </td>
                                <td align="right" valign="middle" width="30">
                                    <asp:Button ID="btnCloseAll2" runat="server" Text="" />
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div class="attention_topright">
                    </div>
                </div>
            </asp:Panel>
            <div class="attention_con">
                <asp:Panel ID="Panel3" runat="server">
                    <table border="1" runat="server" id="table2" cellpadding="5" cellspacing="0" bordercolor="#0e62a7"
                        style="width: 100%; text-align: center; border-collapse: collapse;">
                        <tr>
                            <td style="text-align: Center">
                                <asp:Label ID="lblTS" runat="server" Text=""></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td align="center" class="navi_link">
                                <asp:Button ID="btnBack_ts" runat="server" ToolTip="返回" Visible="true" />
                                <asp:Button ID="btnConfirm2" runat="server" ToolTip="确定" Visible="false" />
                                <asp:Button ID="btnCancel" runat="server" Text="Cancle" Visible="false" />
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
            </div>
        </div>
    </asp:Panel>
    <asp:LinkButton ID="LinkButton3" runat="server" Visible="true"></asp:LinkButton>
    </form>
</body>
</html>
